/*
    JSPWiki - a JSP-based WikiWiki clone.

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); fyou may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/
/*
Section: Modal

    Simplified modal dialog, based on bootstrap styling

DOM Structure:
(start code)
body[.show-modal]
    div.modal[.active]
        ... body ...
        div.modal-footer
            button.btn.btn-default Close
            button.btn.btn-primary OK
    div.backdrop
(end)
*/

.modal {
  position: fixed;
  top: 50%; left: 50%;
  width: 20em; margin: -5em -10em;

  padding: @modal-inner-padding;
  .lead; //get some bigger font

  background-color: @modal-content-bg;
  border: 1px solid @modal-content-border-color;
  border-radius: @border-radius-large;
  .box-shadow(0 5px 15px rgba(0,0,0,.5));
  // Remove focus outline from opened modal
  outline: none;

  .transition(all .6s);
  .opacity(0);
  z-index: -1;
  pointer-events:0;
}


// Modal background DOM element, inserted as last element of the DOM
.backdrop {
    position: fixed;top: 0;left: 0;right: 0;bottom: 0;
    background-color: @modal-backdrop-bg;

    .transition(all .6s);
    .opacity(0);
    z-index: -1;
}

.show-modal {

    .backdrop {
        .opacity(0.3);
        z-index: (@zindex-modal-background - 10); //bring above main content, but below the dialog
    }

    .modal.active {
        .opacity(1);
        z-index: @zindex-modal-background;
	}
}


// Footer (for actions)
.modal-footer {
    margin-top: 15px;
    text-align: center; // right align buttons

    // Properly space out buttons
    .btn + .btn {
        margin-left: 5px;
        margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
    }
}


// Scale up the modal
@media screen and (min-width: @screen-sm-min) {

  .modal {
    //width: 600px;
    //top: 50%; left: 50%;
	//margin: -300px;
    //margin: 30px auto;
  }

}
